package com.ltu.util.exception;

import com.ltu.base.State;

public class MngException extends RuntimeException{
	/**
	 * 
	 */
	private static final long serialVersionUID = -1930612431407158295L;
	
	private Integer code = State.CODE_FAILED;
	
	public MngException(Integer code,String message) {
		super(message);
		this.code = code;
	}
	
	public MngException(State state) {
		super(state.getMessage());
		this.code=state.getCode();
	}

	public MngException(String message) {
		super(message);
	}

	public Integer getCode() {
		return code;
	}

	public void setCode(Integer code) {
		this.code = code;
	}
}
